unit passUnit;

interface
        uses Contnrs, classes;
type
  PassClass = class(TObject)
  private
    { Private declarations }
    Name : String;
    kernelName : String;
    subDomainList : Tstrings;
  public
    (**
        The interface functions (Setters and Getters)
    *)
    procedure set_Name(Nam : String);
    procedure set_kernelName(Nam : String);
    procedure add_SubDomain(subDomNam : String);
    function get_Name():String;
    function get_kernelName():String;
    function get_SubDomain(index : Integer):String;
    function get_SubDomainCount():Integer;
    // The constructor
    Constructor Create(Nam, Knam: String);overload;
  end;

implementation

procedure PassClass.set_Name(Nam : String);
begin
name := Nam;
end;

procedure PassClass.set_kernelName(Nam : String);
begin
kernelName := Nam;
end;

procedure PassClass.add_SubDomain(subDomNam : String);
begin
  subDomainList.Add(subDomNam);
end;

function PassClass.get_Name() : String;
begin
result := Name;
end;

function PassClass.get_kernelName() : String;
begin
result := kernelName;
end;

function PassClass.get_SubDomain(index : Integer):String;
begin
if index >= subDomainList.Count then
  result := ''
else
  result := subDomainList.Strings[index];
end;

function PassClass.get_SubDomainCount():Integer;
begin
  result := subDomainList.Count;
end;

Constructor PassClass.Create(Nam, Knam: String);
begin
set_Name(Nam);
set_kernelName(kNam);
subDomainList := TStringList.Create;
end;

end.
